<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>重置密码</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/static/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/static/layuiadmin/style/admin.css" media="all">
    <style>
        .preview_img{ position: absolute; right: 0; top: 0; margin: 0; }
    </style>
</head>
<body>

<div class="layui-form" lay-filter="layuiadmin-form-list" id="layuiadmin-form-list" style="padding: 20px 30px 44px 0;background: #fff">

    <div class="layui-form-item">
        <label class="layui-form-label">账号名称</label>
        <div class="layui-input-inline">
            <input type="text" value="{$info.account}" disabled autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">密码</label>
        <div class="layui-input-inline">
            <input type="password" name="password" placeholder="请输入密码" lay-verify="pass" lay-verType="tips" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item layui-hide">
        <input type="hidden" name="id" value="{$info.id}" />
        <input type="button" lay-submit lay-filter="LAY-reset-pwd-submit" id="LAY-reset-pwd-submit" value="确认">
    </div>

</div>

<script src="/static/layuiadmin/layui/layui.js"></script>
<script>
    layui.config({
        base: '/static/layuiadmin/' //静态资源所在路径
        ,version: new Date().getTime()
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['form'], function(){

        var $ = layui.$
            ,form = layui.form;

        form.verify({

            pass: function(value){

                if(value.length < 1){
                    return '密码不能为空';
                }

                if(!new RegExp("^[\\S]{6,16}$").test(value)) {
                    return '密码长度为6至16位';
                }
            }

        });

    })
</script>
</body>
</html>